package com.example.polarity;

import android.content.Context;
import android.graphics.BlurMaskFilter;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Matrix;
import android.graphics.Paint;
import android.graphics.Paint.Cap;
import android.graphics.Path;
import android.graphics.RectF;
import android.util.AttributeSet;
import android.view.View;

public class GasClowd extends View 
{
	Path path;
	Paint paint;
	
	int origonalX = 10;
	int origonalY = 10;
	
	int degrees;
	
	public GasClowd(Context context) 
	{	
		super(context);
		// TODO Auto-generated constructor stub
	}
	
	public GasClowd(Context context, AttributeSet attrs) 
	{
		super(context, attrs);
		this.setWillNotDraw(false);
		
		path = new Path(); 
		paint = new Paint();
	}
	
	public GasClowd(Context context, AttributeSet attrs, int defStyle) 
	{
		super(context, attrs, defStyle);
		// TODO Auto-generated constructor stub
	}
	
	@Override
	public void onDraw(Canvas canvas)
	{
		

		/*RectF oval = new RectF();
		
		paint.setColor(Color.BLUE);
		paint.setAlpha(4);
		paint.setStrokeCap(Cap.ROUND);
		paint.setDither(true);
		
		paint.setStrokeWidth(4f);
		paint.setStyle(Paint.Style.STROKE);
		paint.setStrokeJoin(Paint.Join.ROUND);
		paint.setStrokeCap(Paint.Cap.ROUND);
		
		
		paint.setAntiAlias(true);
		paint.setDither(true);
		paint.setColor(Color.BLUE);
		paint.setStrokeWidth(20f);
		paint.setStyle(Paint.Style.STROKE);
		paint.setStrokeJoin(Paint.Join.ROUND);

		
		origonalX += 5;
		origonalY += 5;

			
		Matrix m = new Matrix();
		
		
		path.transform(m);
		//path.moveTo(origonalX,origonalY );
		path.arcTo(oval, degrees, degrees + 30); //lineTo(origonalX + 10, origonalX + 10);

		m.setRotate(degrees);
		canvas.drawPath(path, paint);
		
		if(degrees == 360)
			degrees = 0;*/
		
	    Paint p = new Paint();
	    RectF rectF = new RectF(0, 00, 200, 200);
	    p.setColor(Color.BLUE);
	    canvas.drawArc (rectF, 45, 180, true, p);
		
		
		invalidate();
	}

}
